#include "cmsis_os2.h"
#include "lvgl.h"


extern osMutexId_t LvglMutexHandle;

void StartLvglTask(void *argument)
{
    osMutexAcquire(LvglMutexHandle, osWaitForever);

    lv_obj_t* arc = lv_arc_create(lv_scr_act());
    lv_arc_set_range(arc, 0, 100);  /* 设置 arc 的范围 */
    lv_arc_set_value(arc, 50);      /* 设置 arc 的值 */
    lv_obj_set_size(arc, 200, 200);
    lv_obj_align_to(arc, NULL, LV_ALIGN_CENTER, 0, 0);

    osMutexRelease(LvglMutexHandle);

    for(;;)
    {
        osMutexAcquire(LvglMutexHandle, osWaitForever);
        lv_timer_handler();
        osMutexRelease(LvglMutexHandle);
        osDelay(5);
    }
}
